package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;

@Setter
@Getter
public class Courseorder {
    private Long id;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inputTime;

    private Employee customer;

    private Classinfo classinfo;

    private Long money;


    public String getJson(){
        HashMap map = new HashMap();
        map.put("id", id);
        map.put("inputTime", inputTime);
        map.put("customerId", customer.getId());
        map.put("classinfoId", classinfo.getId());
        map.put("money", money);
        return JSON.toJSONString(map);
    }
}